Skip to content

Show version history in the channel publish side panel#5721

Draft
AllanOXDi wants to merge 1 commit intolearningequality:unstablefrom
AllanOXDi:Ch-version
Draft

Show version history in the channel publish side panel#5721
AllanOXDi wants to merge 1 commit intolearningequality:unstablefrom
AllanOXDi:Ch-version

Conversation

@AllanOXDi
Copy link
Member

Summary

References

Reviewer guidance

AI usage

@AllanOXDi AllanOXDi requested a review from rtibblesbot March 4, 2026 20:12
Copy link

@rtibblesbot rtibblesbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New feature adds channel version history to the publish side panel via a ChannelVersionHistory component and useChannelVersionHistory composable with paginated fetching.

CI passing. No screenshots included — this PR adds a new UI component.

  • suggestion: Hardcoded colors in ChannelVersionHistory.vue — see inline comment
  • suggestion: Missing dedicated tests for ChannelVersionHistory and useChannelVersionHistory — see inline comment
  • suggestion: PR description is empty (template placeholders only) and no screenshots are included for a UI change
  • praise: Clean composable design — see inline comment

@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?

Reviewed the pull request diff checking for:

  • Correctness: bugs, edge cases, undocumented behavior, resource leaks, hardcoded values
  • Design: unnecessary complexity, naming, readability, comment accuracy, redundant state
  • Architecture: duplicated concerns, minimal interfaces, composition over inheritance
  • Testing: behavior-based assertions, mocks only at hard boundaries, accurate coverage
  • Completeness: missing dependencies, unupdated usages, i18n, accessibility, security
  • Principles: DRY (same reason to change), SRP, Rule of Three (no premature abstraction)
  • Checked CI status and linked issue acceptance criteria
  • For UI changes: inspected screenshots for layout, visual completeness, and consistency

.versions-list {
.version-item {
padding: 12px 0;
border-bottom: 1px solid #e0e0e0;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Several hardcoded color values here (#e0e0e0, #f5f5f5, #4a4a4a, #d32f2f). The sibling PublishSidePanel.vue uses $themePalette and $themeTokens for its colors. Consider using the theme system for consistency and dark-mode/theming support — e.g. $themeTokens.error instead of #d32f2f, and $themePalette.grey variants for borders and backgrounds.

* fetchMore: () => Promise<void>,
* }}
*/
export function useChannelVersionHistory() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: Clean separation of concerns. The composable encapsulates pagination state, loading states, and error handling well. The reset() function and guard clauses in fetchMore() are good defensive design.

expect(emitted().close).toBeTruthy();
});

it('renders ChannelVersionHistory component', () => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: This test verifies ChannelVersionHistory renders, but there are no dedicated tests for the component itself or the useChannelVersionHistory composable. The composable has meaningful logic (pagination, error handling, reset) that would benefit from unit tests — especially the fetchMore guard clauses, error recovery, and the reset behavior.

</div>
<div class="description-body">
{{ version.version_notes }}
</div>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: version.version_notes is rendered safely via text interpolation ({{ }}), which is good. Just noting that if notes can be long, you may want to consider truncation or overflow-wrap: break-word on .description-body to handle edge cases with very long unbroken strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants